package object3D;

import context.*;

import geometry3D.Point3D;

import model2D.Model2D;
import object2D.InnvendigTrappProjection;

import java.awt.Color;

import org.json.JSONException;

// ***************************************************************************
// *** CLASS: InnvendigTrapp
// ***************************************************************************
public class InnvendigTrapp extends Block implements Context.Constants
{ //private static final boolean DEBUG=true; // Overriding Context.Constants.DEBUG
  
//  private boolean renderKjeller=false;
  public boolean render1Etage=false;
  public boolean render2Etage=false;
  
  public InnvendigTrapp(String ident,Point3D p0,double width,double height,double depth)
  { super(ident,p0,width,height,depth);
  }
  
  public void setRenderKjeller()
  { //renderKjeller=true;
    render1Etage=false;
    render2Etage=false;
  }
  
  public void setRender1Etage()
  { //renderKjeller=false;
    render1Etage=true;
    render2Etage=false;
  }
  
  public void setRender2Etage()
  { //renderKjeller=false;
    render1Etage=false;
    render2Etage=true;
  }
    
  // ***************************************************************************
  // *** METHOD: getModel3D
  // ***************************************************************************
//  public /*abstract*/ Group getModel3D(Appearance appearance)
//  { Group tg=new Group();
//    tg.addChild(trinn1.getModel3D(appearance));
//    tg.addChild(trinn2.getModel3D(appearance));
//    tg.addChild(trinn3.getModel3D(appearance));
//    tg.addChild(trinn4.getModel3D(appearance));
//    tg.addChild(trinn5.getModel3D(appearance));
//    return(tg);
//  }  


  // ***************************************************************************
  // *** METHOD: addProjection  (2D)
  // ***************************************************************************
  // 3D ==> 2D projections the XZ, XY or ZY-plane
  public void addProjection(Model2D objectModel,int type,int direction,Color color,float opacity) throws JSONException
  { objectModel.addChild(new InnvendigTrappProjection(objectModel,this,type,direction,color,opacity)); }

}
